<template>
	<view class="page">
		<u-navbar :isBack="true" title="设置" title-color="#101010" 
		:background="{background: '#fff'}" :borderBottom="false"></u-navbar>
		
		
		<view style="padding: 32rpx 24rpx;">
			<view style="padding: 32rpx 24rpx;background: #fff;border-radius: 24rpx;">
				<view style="display: flex;align-items: center;" @click="jumpTo('/pages/my/infoBinding?type=info')">
					<view style="flex: 1;font-size: 32rpx;justify-content: space-between;display: flex;">
						<view style="color: #333333;">个人资料</view>
						<image src="@/static/my/ri.png" mode="widthFix" style="width: 32rpx;"></image>
					</view>
				</view>
			</view>
			
			<view style="padding: 32rpx 24rpx;background: #fff;border-radius: 24rpx;margin-top: 24rpx;">
				<view style="display: flex;align-items: center;">
					<view style="flex: 1;font-size: 32rpx;justify-content: space-between;display: flex;">
						<view style="color: #333333;">用户协议</view>
						<image src="@/static/my/ri.png" mode="widthFix" style="width: 32rpx;"></image>
					</view>
				</view>
				<view style="display: flex;align-items: center;margin-top: 50rpx;">
					<view style="flex: 1;font-size: 32rpx;justify-content: space-between;display: flex;">
						<view style="color: #333333;">隐私政策</view>
						<image src="@/static/my/ri.png" mode="widthFix" style="width: 32rpx;"></image>
					</view>
				</view>
				<!-- <view style="display: flex;align-items: center;margin-top: 50rpx;">
					<view style="flex: 1;font-size: 32rpx;justify-content: space-between;display: flex;">
						<view style="color: #333333;">注销账户</view>
						<image src="@/static/my/ri.png" mode="widthFix" style="width: 32rpx;"></image>
					</view>
				</view> -->
			</view>
			<!-- <view style="margin-top: 72rpx;padding: 24rpx;color: #fff;
			border-radius: 16rpx;text-align: center;background: #A5D3FF;">
				切换账号
			</view> -->
			<view style="margin-top: 32rpx;padding: 24rpx;color: #50A5F4;border: 2rpx solid #50A5F4;
			border-radius: 16rpx;text-align: center;" @click="tuiChu">
				退出登录
			</view>
		</view>
		
		<!-- <view style="position: fixed;bottom: 60rpx;width: 100%;">
			<image src="../../static/bottomimg.png" mode="widthFix" style="width: 100%;"></image>
		</view> -->
		<u-toast ref="uToast" />
		
	</view>
</template>

<script>
	import appurl_config from 'utils/config.js'
	import {request} from 'utils/request.js'
	import Vue from 'vue'
	var moment = require('moment');
	export default {
		data() {
			return {
				topImage: appurl_config.appurlImg + '/app/my/topbg.png',
				
				isLogin: false,
				
				meetList: [],
				date:'',
				showCancelConfirm:false,
				showOverConfirm:false,
				id:'',
				
				beingNum:0,
				waitNum:0,
				orList:[],
				state:1,
				
				userinfo: {}
			}
		},
		onLoad() {
			// this.login();
			// // 告诉页面需要刷新登录状态
			uni.$on('htmlRefresh', (e) => {
				console.log('子页面---->>>>>>', e);
				
			})
			
			this.userInfoData();
			uni.hideShareMenu();
		},
		methods: {
			userInfoData(){
				request.getWithToken({
					url: '/user/userInfo'
				}).then(res=>{
					console.log('返回用户信息：', res);
					if(res.code == 1){
						this.userinfo = res.data.user;
					}
				})
			},
			jumpTo(path){
				uni.navigateTo({
					url: path
				})
			},
			toDetail(item){
				Vue.prototype.MeetInfo = item
				uni.navigateTo({
					url:'detail'
				})
			},
			tuiChu(){
				uni.removeStorageSync('userToken');
				setTimeout(() => {
					uni.navigateBack();
					uni.$emit('htmlRefresh', {
						type: 1
					});
				}, 300);
			}
		}
	}
</script>

<style>
	page{
		background-color: #F7F7F7 !important;
	}
</style>
<style lang="scss" scoped>
	.top-box{
		background-size: 100% 100%;
	}
</style>
